SUBROUTINE EBOX1
*Create a simple form with a single editbox, in which text is initially displayed*Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.* Display the text 'Another Form' in the browser's title bar.CALL RW_START_HTML_PAGE("Edit box example", "", "", "", "")CALL RW_PUT("Please enter your name in the box, then click the Go button")* Start the HTML form, specifying that the subroutine HELLO should be* run when the submit button is clickedCALL RW_START_HTML_FORM("HELLO","FORM3","")* Set up the aClass parameter to specify the size of the box, its initial * contents and the maximum length of entry permitted
CLASS=""
CLASS<2>=30
CLASS<3>="YOUR NAME HERE"
CLASS<4>=30
CALL RW_EDIT_BOX("NAME","",CLASS)*Create the submit buttonCALL RW_SUBMIT_BUTTON("GO","")*Complete the formCALL RW_END_FORM*Complete the page.CALL RW_END_PAGE
RETURN
SUBROUTINE HELLO
* Display a Hello message to a user submitting a form* Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page* Display the text 'Response to Form' in the browser's title barCALL RW_START_HTML_PAGE("Response to Form", "", "", "", "")*Retrieve the value of NAMECALL RW_GET_PARAM("NAME",NAME)*Display a greetingCALL RW_PUT("Hello " :NAME)* Complete the pageCALL RW_END_PAGE
RETURN
Form page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>Edit box example</TITLE></HEAD><BODY>
Please enter your name in the box, then click the Go button
<FORM ACTION="HELLO" NAME="FORM3" METHOD="POST"><INPUT MAXLENGTH="30" VALUE="YOUR NAME HERE" SIZE="30" NAME="NAME" TYPE="TEXT"><INPUT TYPE="submit" VALUE="GO"></FORM></BODY></HTML>
Response page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>Response to First Form</TITLE></HEAD><BODY>
Hello Paul
</BODY></HTML>